<admintpl file="header" />
</head>
<body style="min-width: 800px;">
<php>$leave_en = C('VACATION_TYPE_EN');
	$leave_ch = C('VACATION_TYPE');
	$leave_evection = C('LEAVE_TYPE');
	foreach($leave_evection as $k=>$v){
		$leave_en[] = $v['label'];
		$leave_ch[] = $v['title'];
	}
</php>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="">月度考勤数据</a></li>
			<li class=""><a class="" href="{:U('print_monthly',['print'=>2,'map'=>$map])}" target='_blank'>导出预览</a></li>
			<li class=""><a class="loadingurl" href="{:U('print_monthly',['print'=>1,'map'=>$map])}" target='_blank'>导出(分部门)</a></li>
			<li class=""><a class="loadingurl" href="{:U('print_monthly_no_dep',['print'=>1,'map'=>$map])}" target='_blank'>导出(不分部门)</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('monthly')}">
			考勤周期
			<input type="text" name="start_date" class="js-date" value="{$_REQUEST[start_date]? $_REQUEST[start_date]:$start_mon}" style="width: 80px;" autocomplete="off">-
			<input autocomplete="off" type="text" class="js-date" name="end_date" value="{$_REQUEST['end_date'] ? $_REQUEST[end_date]: $end_mon}" style="width: 80px;"> 姓名
			<input type="text" name="name" style="width: 80px;" value="{$_REQUEST[name]}"> 部门 
			<select name="dep_id" id="">
				<option value="">全部</option>
				{$department}
			</select>
			
 			<select name="filter" id="">
				<option value="">全部</option>
				<option value="1" {$_REQUEST["filter"] == 1 ? 'selected' : '' }>免打卡</option>
				<option value="2" {$_REQUEST["filter"] == 2 ? 'selected' : '' }>全部人包括没登录</option>
			</select> 
			
			<button class="btn btn-primary">搜索</button>
			<a class="btn btn-primary" href="{:U('')}">清空</a>
		</form>
		<form class="js-ajax-form" method="post">

			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="">工号</th>
						<th width="">姓名</th>
						<th width="">部门</th>
						<th width="">应出勤天数</th>
						<th width="">加班分钟</th>
						<th width="">迟到小时</th>
						<th width="">早退小时</th>
						<th width="">有效工时</th>
						<th width="">实际工时</th>
						<th width="">准时在岗</th>
						<th width="">准时在岗率</th>
						<th width="">缺勤分钟</th>
						<th width="">可补休小时</th>
						<th width="">请假小时</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.sn}</td>
					<td>{$vo.name}</td>
					<td>{$vo.dep_name}</td>
					<td>{$vo.work_day}</td>
					<td>{$vo.overtime|default=0}</td>
					<td>{$vo.stu_late|get_hour = ###}</td>
					<td>{$vo.stu_leave_early|get_hour = ###}</td>
					<td>{$vo.work_effect|get_hour = ###}</td>
					<td>{$vo.work_actual|get_hour = ###}</td>
					<td>{$vo[work_effect_918]|get_hour = ###}</td>
					<td>{:round($vo[work_effect_918]/($work_days['min']-$v[total_leave]),3)*100}%</td>
					<td>{$vo[stu_absent] >= 0 && !empty($vo[stu_absent]) ? $vo[stu_absent] : 0 }</td>
					<td>{$vo['remain_overtime']}</td>
					<td>
						<foreach name='leave_ch' item='leo' key='k'>
							<notempty name='vo[$leave_en[$k]]'>{$leo}:{$vo[$leave_en[$k]]|get_hour = ###}</notempty>
						</foreach>
					</td>
				</tr>
				</foreach>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>